Repository navigation
ci: deploy and install the app from a manual GitHub Actions workflow - #5
Merged
Merged
Conversation
The app id stays a placeholder in manifest.yml and comes from the FORGE_APP_ID repository variable, so a fork cannot deploy over the app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Build, deploy and install now run from GitHub Actions instead of a laptop. The new Deploy workflow (
.github/workflows/deploy.yml) follows the same shape as the keelapps Forge deploys:workflow_dispatch), because deploying is a decision. Inputs:environment: development, staging or productioninstall:none,install(first time on a workspace) orupgrade(after a scope change)workspace: e.g.bitbucket.org/my-workspacenpm ci, write the app id intomanifest.yml,npm run build,forge lint,forge deploy --non-interactive, and optionallyforge install --confirm-scopes --non-interactive [--upgrade].manifest.ymlkeeps the placeholder, so a fork cannot deploy over the real app. The workflow writes in theFORGE_APP_IDrepository variable and stops with an error when it is missing or malformed.FORGE_EMAILandFORGE_API_TOKENare passed only to the Forge steps, so dependency install scripts never see the token.22.xresolves to. One deploy at a time per environment.The README's Deploying section now describes the one-time setup and this workflow; deploying from a laptop is one line at the end.
Setup before the first run
In Settings > Secrets and variables > Actions:
FORGE_APP_IDari:cloud:ecosystem::app/...thatforge registerprintedFORGE_EMAILFORGE_API_TOKENChecked
actionlintis clean.manifest.yml.forge installflags were checked against the Forge CLI 16.0.0 source: the product nameBitbucketand abitbucket.org/<workspace>site are accepted.npm run buildsucceeds.Not run yet: the workflow itself, which needs the secrets above.